#ifndef TINYALSA_APP_H
#define TINYALSA_APP_H

#include"tinyalsa/asoundlib.h"

#ifdef __cplusplus
extern "C" {
#endif

extern int tinyalsa_play(const char* file_name);
extern struct pcm* pcm_dev_init(int rate);
extern struct pcm* pcm_cap_dev_init(int rate);
extern int pcm_dev_write(struct pcm * pcm, const void * frames, size_t byte_count);
extern int pcm_dev_read(struct pcm * pcm, void * buffer, size_t byte_count);
extern int pcm_dev_close(struct pcm * pcm);
extern int pcm_cap_dev_close(struct pcm * pcm);
extern void set_vol(int left, int right);
extern void set_cap_vol(int left, int right);
extern void capture_open();
extern void capture_close();


#ifdef __cplusplus
}
#endif

#endif // TINYALSA_APP_H
